package com.yihu.wlyy.repository;

import com.yihu.wlyy.entity.WlyyDoctorWorkTime;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by lyr on 2016/08/19.
 */
public interface DoctorWorkTimeDao extends PagingAndSortingRepository<WlyyDoctorWorkTime, Long>, JpaSpecificationExecutor<WlyyDoctorWorkTime> {

    /**
     * 查询医生工作时间
     *
     * @param doctor
     * @return
     */
    @Query("select a from WlyyDoctorWorkTime a where a.doctor = ?1")
    WlyyDoctorWorkTime findDoctorWorkTime(String doctor);


}
